<template>
    <div>
        <div v-for="(item, index) in a" :key="index">
            {{item}}
        </div>
        <button @click="click">dianji</button>
    </div>
</template>

<script>
    export default {
       data:()=>{
           return {
               a:{
                   a1:0,
                   a2:1
               }
           }
       },
       methods:{
           click(){
               this.a.a1=2;
            //    this.$set(this.a,"a3",3)
               console.log(this.a)
           }
       }
    }
</script>

<style lang="scss" scoped>

</style>